package com.mobi.cacti.ns.view;

import org.holoeverywhere.LayoutInflater;
import org.holoeverywhere.app.Fragment;
import org.holoeverywhere.widget.TextView;

import com.mobi.cacti.R;
import com.mobi.cacti.rabbit.response.CustomerInfoCurcitData;

import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;

public class CustInfoLinkInformationActivity extends Fragment {

	private CustomerInfoCurcitData data;
	
	private TextView banNoTextView;
	private TextView circuitNoTextView;
	private TextView packageTextView;
	private TextView mediaTextView;
	private TextView contactNoTextView;
	private TextView contactPeriodTextView;
	private TextView installationAddressTextView;
	private TextView contactPersonNameTextView;
	private TextView emailTextView;
	private TextView phoneTextView;
		
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		Bundle bundle = getArguments();
		data = bundle.getParcelable("data");
	}
	
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		View v = LayoutInflater.from(getActivity()).inflate(
				R.layout.custinfolinkinformation_layout, null);
		
		banNoTextView = (TextView) v.findViewById(R.id.banno);
		circuitNoTextView = (TextView) v.findViewById(R.id.circuitno);
		packageTextView = (TextView) v.findViewById(R.id.packagetextview);
		mediaTextView = (TextView) v.findViewById(R.id.media);
		contactNoTextView = (TextView) v.findViewById(R.id.contractno);
		contactPeriodTextView = (TextView) v.findViewById(R.id.contractperiod);
		installationAddressTextView = (TextView) v.findViewById(R.id.installationaddress);
		emailTextView = (TextView) v.findViewById(R.id.email);
		phoneTextView = (TextView) v.findViewById(R.id.phone);
		contactPersonNameTextView = (TextView) v.findViewById(R.id.contractpersonname);
		
		banNoTextView.setText("Ban No. " + data.ban);
		circuitNoTextView.setText("Circuit No. " + data.id);
		packageTextView.setText("Package: " + data.Package);
		mediaTextView.setText("Media: " + data.mediaProvider);
		contactNoTextView.setText("Contract No." + data.contractNo);
		contactPeriodTextView.setText("Contract Period: " + data.contractPeriod);
		
		contactPersonNameTextView.setText("Contact Person Name: "+ data.contactPerName);
		emailTextView.setText("Email: " + data.contactPerEmail);
		phoneTextView.setText("Phone: " + data.contactPerTel);
		installationAddressTextView.setText("Installation Address: " + data.installationAddress);

		return v;
	}
		
}
